<?php
/**
 * Created by PhpStorm.
 * User: kirito
 * Date: 2019/5/17
 * Time: 上午11:05
 */
include "include.php";

die('is over done');
$config = array(
    'appid' => 'wx4ba5a0e1070e48aa',
    'appsecret' => 'b627d78539abda6da172c767a1182dae'
);
$wx = new \Wechat\WechatCard($config);

$data = array(
    "page" => array(
        "page_title" => "云机汇礼品卡",
        "support_multi" => true,
        "banner_pic_url" => "http://mmbiz.qpic.cn/mmbiz_png/vOcvRicich7vIk0oZicQokHQBaOzJ8nuGHIqsVgmPIwpgWJLCeXszndYJhVwqib73iafmFf61yy8FuSkYAfNkVN9iapw/0",
        "theme_list" => [
            array(
                "theme_pic_url" => "http://mmbiz.qpic.cn/mmbiz_png/vOcvRicich7vIk0oZicQokHQBaOzJ8nuGHIqsVgmPIwpgWJLCeXszndYJhVwqib73iafmFf61yy8FuSkYAfNkVN9iapw/0",
                "title" => "心意卡",
                "title_color" => "#FB966E",
                "show_sku_title_first" => true,
                "item_list" => [
                    array(
                        "card_id" => "pWr5f1U6eAoDAH91EZ78EBHj2-wo",
                        "title" => "心意卡"
                    )
                ],
                "pic_item_list" => [
                    array(
                        "background_pic_url" => "http://mmbiz.qpic.cn/mmbiz_png/vOcvRicich7vIk0oZicQokHQBaOzJ8nuGHIqsVgmPIwpgWJLCeXszndYJhVwqib73iafmFf61yy8FuSkYAfNkVN9iapw/0",
                        "default_gifting_msg" => "小小心意不成敬意"
                    )
                ],
                "is_banner" => true
            )
        ],
        "category_list" => [
            array(
                "title" => "心意祝福"
            ),
        ],
        "address" => "南京市雨花台区软件谷",
        "service_phone" => "020-12345678",
        "biz_description" => "退款指引",
        "cell_1" => array(
            "title" => "申请发票",
            "url" => "https://open.weixin.qq.com"
        ),
        "cell_2" => array(
            "title" => "申请退款",
            "url" => "https://mp.weixin.qq.com"
        )
    )
);

$res = $wx->addPage($data);
var_dump($res);
